<?php

defined('SYSPATH') or die('Access error!');

if ( ! defined('LXD_START_TIME'))
{
	define('LXD_START_TIME', microtime(TRUE));
}

if ( ! defined('LXD_START_MEMORY'))
{
	define('LXD_START_MEMORY', memory_get_usage());
}

function __($string, array $values = NULL, $source = NULL)
{
	if ( ! $source)
	{
		$source = I18n::$source;
	}

	if ($source !== I18n::$lang)
	{
		$string = I18n::get($string);
	}

	return empty($values) ? $string : strtr($string, $values);
}
